CREATE TABLE [dbo].[tb_Pases]
(
[idPase] [int] NOT NULL IDENTITY(1, 1),
[Alumno] [int] NOT NULL,
[Fecha] [datetime] NOT NULL,
[OrganizacionOrigen] [int] NOT NULL,
[OrganizacionDestino] [int] NULL,
[Abandono] [varchar] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_Pases] ADD CONSTRAINT [PK_tb_Pases] PRIMARY KEY NONCLUSTERED  ([idPase]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [idx_Alumno] ON [dbo].[tb_Pases] ([Alumno]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_Pases] WITH NOCHECK ADD CONSTRAINT [FK_tb_Pases_tb_Organizaciones1] FOREIGN KEY ([OrganizacionDestino]) REFERENCES [dbo].[tb_Organizaciones] ([idOrganizaciones])
GO
ALTER TABLE [dbo].[tb_Pases] WITH NOCHECK ADD CONSTRAINT [FK_tb_Pases_tb_Organizaciones] FOREIGN KEY ([OrganizacionOrigen]) REFERENCES [dbo].[tb_Organizaciones] ([idOrganizaciones])
GO
